<table border="1">
<?php
require_once 'tools/db/DbUtils.php';
require_once 'tools/service/tools.php';
$dbUtils=new DbUtils();
$dbUtils->connect();
$tools=new Tool($dbUtils);
$tab=$dbUtils->executeQuery("select * from runnerdata order by nom, prenom");
$tabIdentique=array();
$previous="";
$cpttab=0;
for($i=0;$i<sizeof($tab);$i++){
	$current=$tab[$i]['nom']."_".$tab[$i]['prenom'];
	?>
	
	<tr class="list">
		<td class="listing"><?php echo($i+1); ?></td>
		<td class="listing"><?php echo($tab[$i]['nom']); ?></td>
		<td class="listing"><?php echo($tab[$i]['prenom']); ?></td>
		<td class="listing"><?php echo($tab[$i]['club']); ?></td>
	</tr>
	
	<?php 
	
	if($previous==$current){
		$tabIdentique[$cpttab++]=$tab[$i]['id'];
	}
	$previous=$tab[$i]['nom']."_".$tab[$i]['prenom'];
}
?>
</table>
<?php 
for($i=0;$i<sizeof($tabIdentique);$i++){
	echo $tabIdentique[$i].",";
}
$dbUtils->close();
?>
